#include <key_state_task.h>

#include "GPIO.h"

KEY_STATE key_state;



void app_key_state(void)
{
	key_state.sw1_out1_key = GPIO_ReadInputDataBit(PTA, 11);
	key_state.sw1_out2_key = GPIO_ReadInputDataBit(PTA, 14);
	key_state.sw2_out0_key = GPIO_ReadInputDataBit(PTA, 17);

	key_state.sw1_out3_key = GPIO_ReadInputDataBit(PTB, 10);
	key_state.sw2_out1_key = GPIO_ReadInputDataBit(PTB, 17);
	key_state.sw1_out5_key = GPIO_ReadInputDataBit(PTC, 13);
	key_state.sw1_out0_key = GPIO_ReadInputDataBit(PTE, 0);
	key_state.ai_box_key   = GPIO_ReadInputDataBit(PTE, 1);

	key_state.sw1_out4_key = GPIO_ReadInputDataBit(PTE, 1);
	key_state.flash_en     = GPIO_ReadInputDataBit(PTE, 8);
}
